﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace HQPad.Models
{
    public class Character
    {
        [Required, Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int CharacterID { get; set; }

        [Display(Name = "Character name")]
        [Required(ErrorMessage = "A character name is required")]
        [MaxLength(50, ErrorMessage = "The character name is limited to 100 characters")]
        public string CharacterName { get; set; }

        [Display(Name = "User name")]
        [Required(ErrorMessage = "A user name is required")]
        [MaxLength(50, ErrorMessage = "The user name is limited to 50 characters")]
        public string UserName { get; set; }

        [Display(Name = "Character url slug")]
        [Required(ErrorMessage = "A character slug is required")]
        [MaxLength(100, ErrorMessage = "The character name is limited to 100 characters")]
        public string Slug { get; set; }

        [Display(Name = "Date the character was last saved")]
        public DateTime DateSaved { get; set; }

        [Display(Name = "Character Xml")]
        public string Xml { get; set; }
    }
}